#ifndef DROPDOWNBUTTON_H
#define DROPDOWNBUTTON_H

#include "button.h"
#include "keycontrollablemenu.h"
#include "popupmenu.h"

/**
  * Dropdown buttons are buttons that when clicked reveal a menu of buttons beneath them
  */
class DropDownButton : public Button
{
    Q_OBJECT
public:
    DropDownButton(QIcon icon, QString name,QWidget * parent=0);
    void addButton(Button * button);
    bool hasChildren();
public slots:
    void activate(QWidget * parent=0);
    void buttonSelected(Button * button);
    void deactivate();
signals:
    void selected(Button * button);
private:
    KeyControllableMenu * parentController;
    PopupMenu * menu;
};

#endif // DROPDOWNBUTTON_H
